<script type="text/javascript" src="application/modules/Fphoto/externals/scripts/lightface/LightFace.js"></script>
<script type="text/javascript" src="application/modules/Fphoto/externals/scripts/lightface/LightFace.Image.js"></script>

<script type="text/javascript" src="externals/moolasso/Lasso.js"></script>
<script type="text/javascript" src="externals/moolasso/Lasso.Crop.js"></script>
<script type="text/javascript" src="externals/autocompleter/Observer.js"></script>
<script type="text/javascript" src="externals/autocompleter/Autocompleter.js"></script>
<script type="text/javascript" src="externals/autocompleter/Autocompleter.Local.js"></script>
<script type="text/javascript" src="externals/autocompleter/Autocompleter.Request.js"></script>
<script type="text/javascript" src="externals/tagger/tagger.js"></script>
<script type="text/javascript" src="application/modules/Fphoto/externals/scripts/core.js"></script>
<script type="text/javascript" src="application/modules/Fphoto/externals/scripts/ThinkleScroller.js"></script>
<script type="text/javascript">
var locationUrl = window.location.href;
var isRequestActive = 0;
var text_close = '<?php echo $this->translate('Press Esc to close')?>';
var oldSmoothboxBind = Smoothbox.bind;
Smoothbox.bind = function(el) {
	$$('a img.item_photo_album_photo').removeEvent('click').addEvent('click', function(e){
				e.stop();
				$(this).setStyle('opacity', 0.4);
				light = new LightFace.Image({
					title: '',
					fadeDuration: 100,
//					fadeDelay: 500,
					keys: {
						esc: function() {
							this.close();
						}
					}
				});	
				//do somthing, etc show box
				load = light.load($(this).getParent().get('href'), '0');
				var lb = light;
				window.addEvent('keypress', function(e){
					if(e.key == 'esc'){
						if(lb)
							lb.close();
						
					}
				});			
				$(this).setStyle('opacity', 1);
				return false;
	 	}
	);
	oldSmoothboxBind(el);
}
function boxNextPhotoFPhoto(url){
		load = light.load(url, '1');
}	
</script>
